// FinenessDialog.cpp : implementation file
//

#include "stdafx.h"
#include "CGWork.h"
#include "FinenessDialog.h"
#include "afxdialogex.h"


// FinenessDialog dialog

IMPLEMENT_DYNAMIC(FinenessDialog, CDialogEx)

FinenessDialog::FinenessDialog(int intitialFineness, CWnd* pParent /*=NULL*/)
	: CDialogEx(FinenessDialog::IDD, pParent)
	, fineness(intitialFineness)
{
	
}

FinenessDialog::~FinenessDialog()
{
}

void FinenessDialog::DoDataExchange(CDataExchange* pDX)
{
	CDialogEx::DoDataExchange(pDX);
	DDX_Text(pDX, IDC_EDIT1, fineness);
	DDV_MinMaxInt(pDX, fineness, 2, 200000000);
	DDX_Control(pDX, IDC_EDIT1, finenessEdit);
	DDX_Control(pDX, IDC_SPIN2, finenessSpinControl);
	//finenessEdit.SetWindowTextA("2");
	finenessSpinControl.SetRange(2,20);
}


BEGIN_MESSAGE_MAP(FinenessDialog, CDialogEx)
	ON_BN_CLICKED(IDCANCEL, &FinenessDialog::OnBnClickedCancel)
END_MESSAGE_MAP()


// FinenessDialog message handlers


void FinenessDialog::OnBnClickedCancel()
{
	// TODO: Add your control notification handler code here
	CDialogEx::OnCancel();
}
